package com.zlm.enums;

import lombok.Getter;

/**
 * @author zlm
 * @date 2024/12/9
 */
@Getter
public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    LOGIN_ERROR(406,"用户名或密码错误"),
    SYSTEM_ERROR(500,"出现错误"),

    USERNAME_EXIST(10501,"用户名已存在"),
    PHONENUMBER_EXIST(10502,"手机号已存在"),
    EMAIL_EXIST(10503, "邮箱已存在"),
    REQUIRE_USERNAME(10504, "必需填写用户名"),
    PASSWORD_NOT_NULL(10505, "密码不能为空"),
    USERNAME_NOT_NULL(10506, "用户名不能为空"),
    NICKNAME_NOT_NULL(10507, "昵称不能为空"),
    EMAIL_NOT_NULL(10508, "邮箱不能为空"),


    COMMENT_NOT_EXIST(800,"评论不能为空");
    final int code;
    final String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

}
